https://glot.io/snippets/g5jg8uvh2e/raw/main.lua